package com.tron.dobest.java.trondesign.observer;

public class TronObject implements Observer,Display {
    private Subject subject;
    private String a;
    private String b;


    public TronObject(Subject subject) {
        this.subject = subject;
        subject.registerObserver(this);
    }

    @Override
    public void display() {
        System.out.println(a+"======"+b);
    }

    @Override
    public void update(String a, String b) {
        this.a = a;
        this.b = b;
        display();
    }
}
